/*
 Navicat Premium Dump SQL

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 50744 (5.7.44)
 Source Host           : 127.0.0.1:3306
 Source Schema         : smart_community

 Target Server Type    : MySQL
 Target Server Version : 50744 (5.7.44)
 File Encoding         : 65001

 Date: 18/08/2025 10:47:14
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sc_property_house_type
-- ----------------------------
DROP TABLE IF EXISTS `sc_property_house_type`;
CREATE TABLE `sc_property_house_type` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `property_company_id` bigint(20) NOT NULL COMMENT '物业公司ID',
  `house_type_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '户型名称（必填）',
  `total_area` decimal(10,2) NOT NULL COMMENT '建筑面积（必填，平方米）',
  `usable_area` decimal(10,2) DEFAULT NULL COMMENT '套内面积（平方米）',
  `public_area` decimal(10,2) DEFAULT NULL COMMENT '公摊面积（平方米）',
  `efficiency_rate` decimal(5,2) DEFAULT NULL COMMENT '得房率（%）',
  `bedroom_count` int(11) DEFAULT '0' COMMENT '卧室总数',
  `master_bedroom_count` int(11) DEFAULT '0' COMMENT '主卧数量',
  `secondary_bedroom_count` int(11) DEFAULT '0' COMMENT '次卧数量',
  `children_room_count` int(11) DEFAULT '0' COMMENT '儿童房数量',
  `living_room_count` int(11) DEFAULT '1' COMMENT '客厅数量',
  `dining_room_count` int(11) DEFAULT '0' COMMENT '餐厅数量',
  `kitchen_count` int(11) DEFAULT '1' COMMENT '厨房数量',
  `bathroom_count` int(11) DEFAULT '1' COMMENT '卫生间总数',
  `master_bathroom_count` int(11) DEFAULT '0' COMMENT '主卫数量',
  `public_bathroom_count` int(11) DEFAULT '1' COMMENT '公卫数量',
  `guest_bathroom_count` int(11) DEFAULT '0' COMMENT '客卫数量',
  `study_room_count` int(11) DEFAULT '0' COMMENT '书房数量',
  `storage_room_count` int(11) DEFAULT '0' COMMENT '储物间数量',
  `cloakroom_count` int(11) DEFAULT '0' COMMENT '衣帽间数量',
  `entrance_garden_count` int(11) DEFAULT '0' COMMENT '入户花园数量',
  `master_bedroom_area` decimal(8,2) DEFAULT NULL COMMENT '主卧面积',
  `living_room_area` decimal(8,2) DEFAULT NULL COMMENT '客厅面积',
  `kitchen_area` decimal(8,2) DEFAULT NULL COMMENT '厨房面积',
  `bathroom_area` decimal(8,2) DEFAULT NULL COMMENT '卫生间面积',
  `orientation` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '整体朝向（南北通透、朝南、东西向等）',
  `master_bedroom_orientation` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '主卧朝向',
  `living_room_orientation` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '客厅朝向',
  `floor_position` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '楼层位置（底层、顶层、中间层）',
  `has_garden` tinyint(1) DEFAULT '0' COMMENT '是否有花园（底层）',
  `has_terrace` tinyint(1) DEFAULT '0' COMMENT '是否有露台（顶层）',
  `has_attic` tinyint(1) DEFAULT '0' COMMENT '是否有阁楼（顶层）',
  `is_square` tinyint(1) DEFAULT '1' COMMENT '是否方正',
  `has_irregular_space` tinyint(1) DEFAULT '0' COMMENT '是否有异形空间',
  `is_transparent` tinyint(1) DEFAULT '0' COMMENT '是否南北通透',
  `is_all_bright` tinyint(1) DEFAULT '0' COMMENT '是否全明户型',
  `has_dynamic_static_separation` tinyint(1) DEFAULT '0' COMMENT '是否动静分区',
  `has_wet_dry_separation` tinyint(1) DEFAULT '0' COMMENT '是否干湿分区',
  `balcony_count` int(11) DEFAULT '0' COMMENT '阳台数量',
  `balcony_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '阳台类型（生活阳台、景观阳台）',
  `balcony_style` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '阳台样式（封闭式、开放式）',
  `bay_window_count` int(11) DEFAULT '0' COMMENT '飘窗数量',
  `bay_window_type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '飘窗类型（全飘、半飘）',
  `kitchen_has_balcony` tinyint(1) DEFAULT '0' COMMENT '厨房是否带生活阳台',
  `bathroom_has_bathtub` tinyint(1) DEFAULT '0' COMMENT '卫生间是否带浴缸',
  `bathroom_has_separation` tinyint(1) DEFAULT '0' COMMENT '卫生间是否干湿分离',
  `bathroom_has_window` tinyint(1) DEFAULT '1' COMMENT '卫生间是否有窗户',
  `floor_height` decimal(4,2) DEFAULT NULL COMMENT '层高（米）',
  `net_height` decimal(4,2) DEFAULT NULL COMMENT '净高（米）',
  `has_loft` tinyint(1) DEFAULT '0' COMMENT '是否有loft挑高',
  `has_duplex` tinyint(1) DEFAULT '0' COMMENT '是否有复式',
  `can_modify` tinyint(1) DEFAULT '0' COMMENT '是否可改户型',
  `has_gift_area` tinyint(1) DEFAULT '0' COMMENT '是否有赠送面积',
  `gift_area_desc` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '赠送面积描述',
  `floor_plan_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '户型图类型（原始结构图、装修示意图、尺寸标注图）',
  `floor_plan_status` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '户型图状态（开发商标准图、业主实测图）',
  `floor_plan_url` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '户型图URL',
  `advantage_tags` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '户型优势标签（JSON格式）',
  `suitable_crowd` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '适用人群标签',
  `remark` text COLLATE utf8mb4_unicode_ci COMMENT '备注说明',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态：0-禁用，1-启用',
  `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `create_by` bigint(20) DEFAULT NULL COMMENT '创建人ID',
  `update_by` bigint(20) DEFAULT NULL COMMENT '更新人ID',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '是否删除：0-未删除，1-已删除',
  PRIMARY KEY (`id`),
  KEY `idx_property_company_id` (`property_company_id`),
  KEY `idx_house_type_name` (`house_type_name`),
  KEY `idx_total_area` (`total_area`),
  KEY `idx_status` (`status`),
  KEY `idx_create_time` (`create_time`),
  KEY `idx_deleted` (`deleted`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='物业公司户型表';

-- ----------------------------
-- Records of sc_property_house_type
-- ----------------------------
BEGIN;
INSERT INTO `sc_property_house_type` (`id`, `property_company_id`, `house_type_name`, `total_area`, `usable_area`, `public_area`, `efficiency_rate`, `bedroom_count`, `master_bedroom_count`, `secondary_bedroom_count`, `children_room_count`, `living_room_count`, `dining_room_count`, `kitchen_count`, `bathroom_count`, `master_bathroom_count`, `public_bathroom_count`, `guest_bathroom_count`, `study_room_count`, `storage_room_count`, `cloakroom_count`, `entrance_garden_count`, `master_bedroom_area`, `living_room_area`, `kitchen_area`, `bathroom_area`, `orientation`, `master_bedroom_orientation`, `living_room_orientation`, `floor_position`, `has_garden`, `has_terrace`, `has_attic`, `is_square`, `has_irregular_space`, `is_transparent`, `is_all_bright`, `has_dynamic_static_separation`, `has_wet_dry_separation`, `balcony_count`, `balcony_type`, `balcony_style`, `bay_window_count`, `bay_window_type`, `kitchen_has_balcony`, `bathroom_has_bathtub`, `bathroom_has_separation`, `bathroom_has_window`, `floor_height`, `net_height`, `has_loft`, `has_duplex`, `can_modify`, `has_gift_area`, `gift_area_desc`, `floor_plan_type`, `floor_plan_status`, `floor_plan_url`, `advantage_tags`, `suitable_crowd`, `remark`, `status`, `create_time`, `update_time`, `create_by`, `update_by`, `deleted`) VALUES (1, 14, '三室两厅一卫', 85.00, NULL, NULL, NULL, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, NULL, 0, 0, 0, 1, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2025-08-18 10:43:38', '2025-08-18 10:43:38', NULL, NULL, 0);
INSERT INTO `sc_property_house_type` (`id`, `property_company_id`, `house_type_name`, `total_area`, `usable_area`, `public_area`, `efficiency_rate`, `bedroom_count`, `master_bedroom_count`, `secondary_bedroom_count`, `children_room_count`, `living_room_count`, `dining_room_count`, `kitchen_count`, `bathroom_count`, `master_bathroom_count`, `public_bathroom_count`, `guest_bathroom_count`, `study_room_count`, `storage_room_count`, `cloakroom_count`, `entrance_garden_count`, `master_bedroom_area`, `living_room_area`, `kitchen_area`, `bathroom_area`, `orientation`, `master_bedroom_orientation`, `living_room_orientation`, `floor_position`, `has_garden`, `has_terrace`, `has_attic`, `is_square`, `has_irregular_space`, `is_transparent`, `is_all_bright`, `has_dynamic_static_separation`, `has_wet_dry_separation`, `balcony_count`, `balcony_type`, `balcony_style`, `bay_window_count`, `bay_window_type`, `kitchen_has_balcony`, `bathroom_has_bathtub`, `bathroom_has_separation`, `bathroom_has_window`, `floor_height`, `net_height`, `has_loft`, `has_duplex`, `can_modify`, `has_gift_area`, `gift_area_desc`, `floor_plan_type`, `floor_plan_status`, `floor_plan_url`, `advantage_tags`, `suitable_crowd`, `remark`, `status`, `create_time`, `update_time`, `create_by`, `update_by`, `deleted`) VALUES (2, 12, '三室两厅一卫', 85.00, NULL, NULL, NULL, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, NULL, NULL, 0, NULL, 0, 0, 0, 1, NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, '2025-08-18 10:43:38', '2025-08-18 10:43:38', NULL, NULL, 0);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
